package main.client;
import java.io.Serializable;
import java.util.ArrayList;

public class Cart implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private ArrayList<Item> items = new ArrayList<Item>();
	private User user;
	
	/** Empty constructor
	 * @param 
	 * @return 
	 */
	public Cart() {
		
	}
	
	
	/** addItem
	 * Adds an item to this cart.
	 * @param Item
	 * @return -
	 */
	public void addItem(Item item) {
		this.items.add(item);
	}
	
	
	/** getItems
	 * @param -
	 * @return ArrayList with all items in this cart
	 */
	public ArrayList<Item> getItems() {
		return items;
	}

	/** setUser
	 * Sets the user to which this cart belong.
	 * @param User
	 * @return -
	 */
	public void setUser(User user) {
		this.user = user;
	}

	/** getUser
	 * @param -
	 * @return Returns the user to which this cart belong.
	 */
	public User getUser() {
		return user;
	}
	
	
}
